package LeetCode.month04.day107;

/**
 * @author 16778
 * @date 2025/11/17 8:17
 * @description
 */
public class No1437 {
    public boolean kLengthApart(int[] nums, int k) {
        int n = nums.length;
        int count = -k-1;
        for (int i = 0; i < n; i++) {
            if(nums[i]==1){
                if(i-count<=k) return false;
                count=i;
            }
        }
        return true;
    }
}
